package com.sample.tab;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;



public class Ball {
private int radius, x, y, xVel, yVel, ID, color;
private Bitmap img;


public Ball(int radius, int x, int y, int xVel, int yVel, int color, int ID){
this.x=x;
this.y=y;
this.xVel=xVel;
this.yVel=yVel;
this.color=color;
this.radius=radius;
this.ID=ID;
}
public Ball(/*Context context, int drawable*/){
BitmapFactory.Options opts= new BitmapFactory.Options();
opts.inJustDecodeBounds=true;
//img=BitmapFactory.decodeResource(context.getResources(), drawable);
x=50;
y=50;
xVel=20;
yVel=20;
color=Color.BLUE;
radius=1;
ID=1;
}
/*public Bitmap getImage(){
return img;	
}*/
public void setID(int id){
ID=id;	
}
public void setRadius(int radius2){
radius=radius2;	
}
public void setX(int X){
x=X;	
}
public void setY(int Y){
y=Y;	
}
public void setxVel(int Vel){
xVel=Vel;	
}
public void setyVel(int Vel){
yVel=Vel;	
}
public void setColor(int colour){
color=colour;	
}
public int getID(){
return ID;	
}
public int getX(){
return x;	
}
public int getY(){
return y;	
}
public int getxVel(){
return xVel;	
}
public int getyVel(){
return yVel;	
}
public int getColor(){
return color;	
}
public int getRadius(){
return radius;	
}
public void move(int newX, int newY, Ball ball2){		
if (x<=25 || x>=460){
xVel=-newX;	
}

if (y<=25){
yVel=-yVel;	
}

x+=xVel;
y+=yVel;
}
}
